package com.macrounion.atv.service.mapper;

import com.macrounion.atv.service.entity.Net;
import com.macrounion.atv.service.entity.Protocol;
import com.macrounion.atv.service.entity.ProtocolC;

import java.util.List;

import com.macrounion.atv.service.entity.ext.ProtocolExt;
import com.macrounion.atv.service.entity.ext.ProtocolOutExt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ProtocolMapperExt {

    List<ProtocolC> getProtocolMap(List<String> pids);

    List<Net> getNets();

    List<Protocol> getProtocolByType(@Param("type") String type);

    List<ProtocolExt> requestPageExt(Protocol p);

    List<ProtocolOutExt> getProtocolOut(@Param("protocolId") String protocolId);

    int saveProtocols(List<Protocol> protocols);

    //在外部导入协议时检索是否重名
    int getCountByName(@Param("protocolName") String protocolName);

    List<Protocol> getProtocolByNetId(@Param("netId") String netId);

    int checkIsUsed(@Param("protocolId") String protocolId);
}